home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / vibrant / viewer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-05  |  5.7 KB  |  141 lines  |  [TEXT/R*ch]

  1. /*   viewer.h
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE
  5. *            National Center for Biotechnology Information (NCBI)
  6. *
  7. *  This software/database is a "United States Government Work" under the
  8. *  terms of the United States Copyright Act.  It was written as part of
  9. *  the author's official duties as a United States Government employee and
  10. *  thus cannot be copyrighted.  This software/database is freely available
  11. *  to the public for use. The National Library of Medicine and the U.S.
  12. *  Government do not place any restriction on its use or reproduction.
  13. *  We would, however, appreciate having the NCBI and the author cited in
  14. *  any work or product based on this material
  15. *
  16. *  Although all reasonable efforts have been taken to ensure the accuracy
  17. *  and reliability of the software and data, the NLM and the U.S.
  18. *  Government do not and cannot warrant the performance or results that
  19. *  may be obtained by using this software or data. The NLM and the U.S.
  20. *  Government disclaim all warranties, express or implied, including
  21. *  warranties of performance, merchantability or fitness for any particular
  22. *  purpose.
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:  viewer.h
  27. *
  28. * Author:  Jonathan Kans, Jill Shermer
  29. *
  30. * Version Creation Date:   10/25/92
  31. *
  32. * $Revision: 1.19 $
  33. *
  34. * File Description: 
  35. *
  36. * Modifications:  
  37. * --------------------------------------------------------------------------
  38. * Date     Name        Description of modification
  39. * -------  ----------  -----------------------------------------------------
  40. *
  41. *
  42. * ==========================================================================
  43. */
  44.  
  45. #ifndef _VIEWER_
  46. #define _VIEWER_
  47.  
  48. #ifndef _VIBRANT_
  49. #include <vibrant.h>
  50. #endif
  51.  
  52. #ifndef _PICTURE_
  53. #include <picture.h>
  54. #endif
  55.  
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif
  59.  
  60. /*****************************************************************************
  61. *
  62. *   STRUCTURE TYPEDEFS
  63. *
  64. *****************************************************************************/
  65.  
  66. typedef struct viewer {
  67.   Nlm_VoidPtr  dummy;
  68. } HNDL Nlm_VieweR;
  69.  
  70. /*  Viewer callback type */
  71.  
  72. typedef void (*Nlm_VwrClckProc) PROTO((Nlm_VieweR, Nlm_SegmenT, Nlm_PoinT));
  73. typedef void (*Nlm_VwrPanProc) PROTO((Nlm_VieweR, Nlm_SegmenT));
  74. typedef void (*Nlm_VwrDrawProc) PROTO((Nlm_VieweR, Nlm_SegmenT));
  75. typedef void (*Nlm_VwrFreeProc) PROTO ((Nlm_VieweR, Nlm_VoidPtr));
  76.  
  77. /*****************************************************************************
  78. *
  79. *   FUNCTION PROTOTYPES
  80. *
  81. *****************************************************************************/
  82.  
  83. extern Nlm_VieweR  Nlm_CreateViewer       PROTO((Nlm_GrouP prnt, Nlm_Int2 width, Nlm_Int2 height, Nlm_Boolean vscroll, Nlm_Boolean hscroll));
  84. extern void        Nlm_ResetViewer        PROTO((Nlm_VieweR viewer));
  85. extern Nlm_VieweR  Nlm_DeleteViewer       PROTO((Nlm_VieweR viewer));
  86.  
  87. extern void        Nlm_AttachPicture      PROTO((Nlm_VieweR viewer, Nlm_SegmenT picture, Nlm_Int4 pntX, Nlm_Int4 pntY,
  88.             Nlm_Int2 align, Nlm_Int4 scaleX, Nlm_Int4 scaleY, Nlm_VwrDrawProc draw));
  89. extern void        Nlm_AttachInstance     PROTO((Nlm_VieweR viewer, Nlm_SegmenT picture, Nlm_Int4 pntX, Nlm_Int4 pntY,
  90.             Nlm_Int2 align, Nlm_Int4 scaleX, Nlm_Int4 scaleY, Nlm_VwrDrawProc draw,
  91.             Nlm_VoidPtr data, Nlm_VwrFreeProc cleanup));
  92. extern void        Nlm_EstimateScaling    PROTO((Nlm_VieweR viewer, Nlm_SegmenT picture, Nlm_Int4 pntX, Nlm_Int4 pntY,
  93.             Nlm_Int2 align, Nlm_Int4Ptr scaleX, Nlm_Int4Ptr scaleY));
  94.  
  95. extern void        Nlm_SetViewerProcs     PROTO((Nlm_VieweR viewer, Nlm_VwrClckProc click, Nlm_VwrClckProc drag,
  96.             Nlm_VwrClckProc release, Nlm_VwrPanProc pan));
  97. extern void        Nlm_SetViewerData      PROTO((Nlm_VieweR viewer, Nlm_VoidPtr data, Nlm_VwrFreeProc cleanup));
  98. extern Nlm_VoidPtr Nlm_GetViewerData      PROTO((Nlm_VieweR viewer));
  99. extern void        Nlm_ViewerBox          PROTO((Nlm_VieweR viewer, BoxPtr world, BoxPtr port, RectPtr view, Nlm_Int4Ptr scaleX, Nlm_Int4Ptr scaleY));
  100. extern void        Nlm_PrintViewer        PROTO((Nlm_VieweR viewer));
  101.  
  102. extern Nlm_SegmenT Nlm_FindSegment        PROTO((Nlm_VieweR viewer, Nlm_PoinT pt, Nlm_Uint2Ptr segID, Nlm_Uint2Ptr primID, Nlm_Uint2Ptr primCt));
  103. extern void        Nlm_ShowSegment        PROTO((Nlm_VieweR viewer, Nlm_SegmenT segment));
  104. extern void        Nlm_HideSegment        PROTO((Nlm_VieweR viewer, Nlm_SegmenT segment));
  105. extern void        Nlm_HighlightSegment   PROTO((Nlm_VieweR viewer, Nlm_SegmenT segment, Nlm_Int1 highlight));
  106.  
  107. extern void        Nlm_HighlightPrimitive PROTO((Nlm_VieweR viewer, Nlm_SegmenT segment, Nlm_PrimitivE primitive, Nlm_Int1 highlight));
  108.  
  109. extern void        Nlm_MapWorldToViewer   PROTO((Nlm_VieweR viewer, Nlm_PntInfo pnt, Nlm_PointPtr pt));
  110. extern void        Nlm_MapViewerToWorld   PROTO((Nlm_VieweR viewer, Nlm_PoinT pt, PntPtr pnt));
  111.  
  112. #define VieweR Nlm_VieweR
  113. #define VwrClckProc Nlm_VwrClckProc
  114. #define VwrPanProc Nlm_VwrPanProc
  115. #define VwrDrawProc Nlm_VwrDrawProc
  116. #define VwrFreeProc Nlm_VwrFreeProc
  117. #define CreateViewer Nlm_CreateViewer
  118. #define ResetViewer Nlm_ResetViewer
  119. #define DeleteViewer Nlm_DeleteViewer
  120. #define AttachPicture Nlm_AttachPicture
  121. #define AttachInstance Nlm_AttachInstance
  122. #define EstimateScaling Nlm_EstimateScaling
  123. #define SetViewerProcs Nlm_SetViewerProcs
  124. #define SetViewerData Nlm_SetViewerData
  125. #define GetViewerData Nlm_GetViewerData
  126. #define ViewerBox Nlm_ViewerBox
  127. #define PrintViewer Nlm_PrintViewer
  128. #define FindSegment Nlm_FindSegment
  129. #define ShowSegment Nlm_ShowSegment
  130. #define HideSegment Nlm_HideSegment
  131. #define HighlightSegment Nlm_HighlightSegment
  132. #define HighlightPrimitive Nlm_HighlightPrimitive
  133. #define MapWorldToViewer Nlm_MapWorldToViewer
  134. #define MapViewerToWorld Nlm_MapViewerToWorld
  135.  
  136. #ifdef __cplusplus
  137. }
  138. #endif
  139.  
  140. #endif
  141.